package com.bestcem.xm.deliver.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bestcem.xm.component.mybatis.service.IXmService;
import com.bestcem.xm.deliver.controller.v2.param.GetCustomlinkPageParam;
import com.bestcem.xm.deliver.controller.v2.vo.AllDeliverDeliverPageVo;
import com.bestcem.xm.deliver.controller.v2.vo.DeliverCustomLinkPageVo;
import com.bestcem.xm.deliver.controller.vo.DeliverCustomLinkVo;
import com.bestcem.xm.deliver.entity.DeliverCustomLink;
import com.bestcem.xm.deliver.entity.DeliverDeliver;
import org.springframework.web.multipart.MultipartFile;
import springfox.documentation.annotations.ApiIgnore;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * @author been
 * @description 针对表【ds_deliver_customlink】的数据库操作Service
 * @createDate 2022-11-07 13:49:46
 */
public interface DeliverCustomLinkService extends IXmService<DeliverCustomLink> {

    /**
     * 分页查询
     *
     * @param page  page
     * @param param param
     * @return 数据
     */
    DeliverCustomLinkPageVo getCustomlinks(@ApiIgnore Page<DeliverCustomLink> page, GetCustomlinkPageParam param);

    /**
     * 查询自定义链接
     *
     * @param param 参数
     * @return 数据
     */
    List<DeliverCustomLinkVo> getCustomlinksList(GetCustomlinkPageParam param);

    Map<String, String> getCustomlinksDownload(String deliverId);

    Map<String, String> getExternalParameterTemplate(String deliverId);

    Map<String, String> saveCustomlink(JSONObject param, String baseUrl);

    Map<String, String> putCustomlink(JSONObject param, String baseUrl);

    Map<String, String> extParamTemplateImport(MultipartFile file, String groupId, String deliverId);

    AllDeliverDeliverPageVo getAllCustomdeliver(@ApiIgnore Page<DeliverDeliver> page, GetCustomlinkPageParam param, String id);

    void getCLDeliver(HttpServletRequest request, HttpServletResponse response);

    JSONObject postCLDeliver(Map<String, String> urlParamMap, JSONObject param, HttpServletRequest request);
}
